package common

import "time"

func Date(layout string) string {
	//返回格式化的时间
	return time.Now().Format(layout)
}

func IsODD(num int) bool {
	//判断偶数
	//导航条偶数索引为名称，技术索引为路由
	return num%2 == 0
}

//对时间进行格式化操作
func DateDay(date time.Time) string {
	return date.Format("2006-01-02 15:04:05")
}

func GetNextName(Navigation []string, index int) string {
	//功能为根据导航条的名字返回路由
	//["首页","/", "GO语言","/golang", "归档","/pigeonhole", "关于","/about"]
	return Navigation[index+1]
}
